You are here: Statements and Functions > Res()
Syntax samples
RES(<resource name-index number>)
USE 10 RES(Var1) for 1.5 min
FREE RES(Var1)
DISPLAY "Now using" $ RES(Var1)
Converts a name-index number or integer to a resource name. Use this function when a statement or function needs the name of a resource whose name index number is stored in an attribute, variable, or some other expression. When used in a string expression expecting, such as in the third syntax example above, ProModel will output the actual name of the resource.
Use RES() to assign a properly skilled operator according to the attribute of the part or to change the duties of resources as the simulation progresses.
Any statement where a resource name is normally used, except in the Move Logic field in the Routing edit table. Also used in string expressions.
Components
<resource name-index number>
The name-index number of the resource desired. This component may be an expression. Real numbers will be truncated to integers.
Example
The logic below uses five different resource types for ten minutes in rotation.
INT Var1 = 1
WHILE Var1 <= 5 DO
BEGIN
USE RES(Var1) FOR 10 min
INC Var1
END
ENT(), LOC(), and GRAPHIC.